/**
 * 获取两日期之间日期列表函数
 * @param {string} stime 开始时间
 * @param {string} etime 结束时间
 * @returns
 */
export function getdiffdate(stime, etime) {
    var diffdate = new Array();
    var i = 0;
    function supplement(str) {
        return str
            .split("-")
            .map((v) => v.padStart(2, 0))
            .join("-");
    }
    stime = supplement(stime);
    etime = supplement(etime);
    while (stime <= etime) {
        diffdate[i] = stime;
        var stime_ts = new Date(stime).getTime();
        var next_date = stime_ts + 24 * 60 * 60 * 1000;
        var next_dates_y = new Date(next_date).getFullYear() + "-";
        var next_dates_m = new Date(next_date).getMonth() + 1 < 10 ? "0" + (new Date(next_date).getMonth() + 1) + "-" : new Date(next_date).getMonth() + 1 + "-";
        var next_dates_d = new Date(next_date).getDate() < 10 ? "0" + new Date(next_date).getDate() : new Date(next_date).getDate();
        stime = next_dates_y + next_dates_m + next_dates_d;
        i++;
    }
    return diffdate;
}
